/* hal_pctrl.h */

#ifndef __HAL_PCTRL_H__
#define __HAL_PCTRL_H__

#include "hal_common.h"

typedef enum
{
	PCTRL_PinMux_Alt0 = 0u,
	PCTRL_PinMux_Alt1 = 1u,
	PCTRL_PinMux_Alt2 = 2u,
	PCTRL_PinMux_Alt3 = 3u,
	PCTRL_PinMux_Alt4 = 4u,
	PCTRL_PinMux_Alt5 = 5u,
	PCTRL_PinMux_Alt6 = 6u,
	PCTRL_PinMux_Alt7 = 7u,

	PCTRL_PinMux_Disabled = 0u,
	PCTRL_PinMux_Analog   = 0u,
	PCTRL_PinMux_GPIO     = 1u,
} PCTRL_PinMux_Type;

typedef enum
{
	PCTRL_PinPullMode_Disabled = 0u,
	PCTRL_PinPullMode_PullDown = 2u,
	PCTRL_PinPullMode_PullUp   = 3u,
} PCTRL_PinPullMode_Type;

typedef struct
{
    PCTRL_PinMux_Type PinMux;
    bool EnableHighDriveStrength;
    bool EnablePassiveFilter;
    bool EnableSlowRate;
    PCTRL_PinPullMode_Type PinPullMode;
} PCTRL_PinConf_Type;

void PCTRL_SetPinConf(PCTRL_Type * base, uint32_t pin_idx, PCTRL_PinConf_Type * conf);


#endif /* __HAL_PCTRL_H__ */

